﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace NewsProgram.Models
{
    [MetadataType(typeof(NewsItemData))]
    public partial class NewsItem
    { }
    public class NewsItemData
    {
        [Required(ErrorMessage="Title required")]
        public string Title { get; set; }

        [Required(ErrorMessage = "News text required")]
        public string NewsText { get; set; }
    }
}